package com.ymatou.iapi.liveinfo.parameter;

public enum  SearchTypeEnum {
	 // 全部
    All(0, "All"),

    // 按品牌名称查询
    BrandName(1, "BrandName"),

    // 按分类名称查询
    CategoryName(2, "CategoryName"),

    // 按品牌和分类编号查询
    BrandIdAndCategoryId(3, "BrandIdAndCategoryId");

    // 成员变量  
    private String name;  
    private int index;  
    // 构造方法  
    private SearchTypeEnum( int index,String name) {  
        this.name = name;  
        this.index = index;  
    }  
    // 普通方法  
    public static String getName(int index) {  
        for (SearchTypeEnum c : SearchTypeEnum.values()) {  
            if (c.getIndex() == index) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
    // get set 方法  
    public String getName() {  
        return name;  
    }  
    public void setName(String name) {  
        this.name = name;  
    }  
    public int getIndex() {  
        return index;  
    }  
    public void setIndex(int index) {  
        this.index = index;  
    } 
}
